package com.lsx143.wordcount.day2;

import com.lsx143.wordcount.bean.WaterSensor;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.Arrays;
import java.util.List;

public class SourceArrayList {
    public static void main(String[] args) throws Exception {
        List<WaterSensor> waterSensors = Arrays.asList(
                new WaterSensor("sensor_1", 1633792000L, 10),
                new WaterSensor("sensor_2", 1633794000L, 50),
                new WaterSensor("sensor_3", 1633796000L, 40)
        );
        List<Integer> nums = Arrays.asList(1, 3, 5, 7, 8);
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);
//        env.fromCollection(waterSensors).print();
        env.fromCollection(nums).print();
        env.execute();
    }
}
